package com.kkyy.recommendmusic.controller;

import com.kkyy.common.utils.R;
import com.kkyy.recommendmusic.entity.PlayListsEntity;
import com.kkyy.recommendmusic.service.PlayListsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/recommendmusic")
public class PlayListsController {
    @Autowired
    private PlayListsService playListsService;

    // 查询歌单(前端)
    @RequestMapping("/playlists")
    public R getPlayLists() {
        List<PlayListsEntity> playLists = playListsService.getPlayLists();
        return R.ok().put("data", playLists);
    }
}